import { defineStore } from "pinia"

export const useHandleSocketStore = defineStore({
    id: 'handleSocket',
    state: () => ({
        showDialog: false,
        equipmentData: {},
        src: '',
        location: ''
    }),
    actions: {
        async SetShowDialog(show: any) {

            this.$patch({
                showDialog: show,
            });
        },
        async SetequipmentData(data: any) {
            this.$patch({
                equipmentData: data,
            });
        },
        async Setsrc(src: any) {
            this.$patch({
                src: src,
            });
        },
        async Setlocation(location: any) {
            this.$patch({
                location: location,
            });
        },
    },
})